/*
 * @Author: 张小平
 * @Date:   2025-05-01
 * @Email:  qqshuqian@163.com
 * @Copyright © 2024 aseyun. All rights reserved.
 */
export const fqmtableOption = {
    "border": true,
    "index": true,
    "indexLabel": "#",
    "stripe": true,
    "menuAlign": "center",
    "align": "center",
    grid: window.isMobile,
    gridSpan: 24,
    addBtn:false,
    delBtn:false,
    cellBtn:true,
    // searchBtn:false,
    // refreshBtn:false,
    // columnBtn:false,
    // searchShowBtn:false,
    "searchMenuSpan": 6,
    "column": [

        {
            "type": "input",
            "label": "列名",
            "prop": "columnName",
            'search': false,
            "span": 12
        }
        ,
        {
            "type": "input",
            "label": "名称",
            "prop": "label",
            "rules": [{
                required: true,
                message: '名称不能为空',
                trigger: 'blur'
            }],
            'search': false,
            cell: true,
            "span": 12
        }
        ,
        {
            "type": "input",
            "label": "字段",
            "prop": "prop",
            'search': false,
            "span": 12
        }
,
        {
            "type": "switch",
            "label": "是否显示",
            "prop": "isQuery",
            cell: true,
            'search': false,
            "span": 12,
            dicData:[
                {"label":"否","value":0},
                {"label":"是","value":1}

            ]
        }

        ,
        {
            "type": "select",
            "label": "查询类型",
            "prop": "queryType",
            width:80,
            cell: true,
            dicData:[
                {"label":"无","value":"none"},
                {"label":"等于","value":"eq"},
                {"label":"不等于","value":"nq"},
                {"label":"大于等于","value":"ge"},
                {"label":"大于","value":"g"},
                {"label":"小于等于","value":"le"},
                {"label":"小于","value":"l"},
                {"label":"模糊","value":"like"},
                {"label":"左模糊","value":"llike"},
                {"label":"右模糊","value":"rlike"},
                {"label":"范围","value":"range"}
            ],
            'search': false,
            "span": 24
        }

        ,
        {
            "type": "input",
            "label": "列宽度",
            "prop": "columnWidth",
            width:60,
            'search': false,
            cell: true,
            "span": 12
        }
        ,
        {
            "type": "select",
            "label": "排序类型",
            "prop": "orderType",
            cell: true,
            dicData:[
                {"label":"正序","value":"asc"},
                {"label":"倒序","value":"desc"}
            ],
            'search': false,
            "span": 12
        }

        ,
        {
            "type": "select",
            "label": "渲染类型",
            "prop": "columnShowType",
            cell: true,
            dicData:[
                {"label":"输入框","value":"input"},
                {"label":"数字","value":"number"},
                {"label":"下拉框","value":"select"},
                // {"label":"单选框","value":"radio"},
                // {"label":"多选框","value":"checkbox"},
                {"label":"年","value":"year"},
                {"label":"周","value":"week"},
                {"label":"月","value":"month"},
                {"label":"日期","value":"date"},
                {"label":"日期时间","value":"datetime"},
                {"label":"时间","value":"time"},
                {"label":"开关","value":"switch"},
                {"label":"级联","value":"cascader"},
                {"label":"图片","value":"upload"},
                {"label":"富文本","value":"ueditor"},
                {"label":"人员","value":"userChoose"},
                {"label":"组织","value":"orgTreeChoose"},
                {"label":"角色","value":"roleTreeChoose"},
                {"label":"规则显示","value":"rule"},
            ],
            'search': false,
            "span": 12
        },
        {
            "type": "textarea",
            "label": "显示规则",
            cell: true,
            "prop": "showRuleFun",
            "tip":"(val, value, label) => { return val.name; }",
            multiple: true,
            "span": 24
        }
        ,
        {
            "type": "input",
            "label": "列优先级",
            "prop": "tableSort",
            cell: true,
            'search': false,
            "span": 12
        },
        {
            "type": "switch",
            "label": "分组字段",
            "prop": "isGroup",
            cell: true,
            'search': false,
            "span": 12,
            dicData:[
                {"label":"否","value":0},
                {"label":"是","value":1}

            ]
        }


        ,
        {
            "type": "select",
            "label": "统计类型",
            cell: true,
            "prop": "groupType",
            multiple: true,
            dicData:[
                {"label":"平均值","value":"avg"},
                {"label":"最大值","value":"max"},
                {"label":"最小值","value":"min"},
                {"label":"求和","value":"sum"},
                {"label":"个数","value":"count"},
                {"label":"其他","value":"other"}
            ],
            'search': false,
            "span": 12
        }      ,
        {
            "type": "textarea",
            "label": "统计规则",
            cell: true,
            "prop": "groupJson",
            "tip":"内容格式为JSON,例如{\"求和\":\"总分\",\"其他\":\"测试\",\"rule\":\"group_concat(xq)\"}。rule可以定义各种查询模式",
            multiple: true,
            "span": 24
        },

        {
            "type": "select",
            "label": "索引类型",
            cell: true,
            "prop": "indexType",
            dicData: [
                {"label": "无", "value": 0},
                {"label": "主键", "value": 1},
                {"label": "唯一索引", "value": 2},
                {"label": "组合唯一索引", "value": 3}
            ],
            multiple: false,
            'search': false,
            "span": 12
        }
        ,
        {
            "type": "select",
            "label": "数据字典",
            cell: true,
            "prop": "dicValue",
            filterable:true,
            virtualize:true,
            multiple: false,
            'search': false,
            "span": 12
        }
        ,
        {
            "type": "select",
            "label": "标签",
            cell: true,
            "prop": "tag",
            multiple: true,
            'search': false,
            "span": 12,
            dicData: [
                {"label": "必填", "value": 'required'},
                {"label": "合并", "value": 'merge'},
                {"label": "冻结", "value": 'fixed'},
                {"label": "统计合计-平均值", "value": 'showSummary_avg'},
                {"label": "统计合计-数量", "value": 'showSummary_count'},
                {"label": "统计合计-总和", "value": 'showSummary_sum'},
                {"label": "超出省略", "value": 'overHidden'}
            ]
        }

        // ,
        // {
        //     "type": "input",
        //     "label": "排序",
        //     "prop": "queryFieldSort",
        //     'search': false,
        //     "span": 12
        // }
        //
        // ,
        // {
        //     "type": "input",
        //     "label": "在管理界面中的列排序",
        //     "prop": "tableSort",
        //     'search': false,
        //     "span": 12
        // }



    ]
}
